<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
        .is_hiddenTr{display: none;}
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
<!-- 标题 -->
<div class="page-heade">
    <h2 class="title_color text-center">销售费用核销申请</h2>
</div>
<!-- 标题 -->
<div class="contact-box" style="padding: 10px">
    <a class="btn btn-info" type="button" href="{:url('exportview',['id'=>request()->param('id')])}">导出Excel</a>
</div>
<table class="table table-bordered text-center bud_hei" style="margin-bottom: 0">
    <tr>
        <td style="min-width: 120px;width: 120px">申请人</td>
        <td class="text-left"><span style="color:blue">{$basic.cuser_name}</span></td>
        <td style="min-width: 120px;width: 120px">所属部门/职位</td>
        <td class="text-left">{$basic.cuser_department}/{$basic.cuser_job}</td>
        <td style="min-width: 120px;width: 120px">面单编号</td>
        <td class="text-left">{$basic.sn}</td>
        <td style="min-width: 120px;width: 120px">提交时间</td>
        <td class="text-left">{$basic.ctime}</td>
    </tr>
    <tr>
        <td style="min-width: 120px;width: 120px">经销商名称</td>
        <td class="text-left">{$basic.jxs_title}{if $basic.jxs_direct==1}<span style="color:blue;font-size:12px;">直营</span>{/if}</td>
        <td style="min-width: 120px;width: 120px">开户行</td>
        <td class="text-left">{if $basic.jxs_cw_bank}{$basic.jxs_cw_bank}{else}待补录{/if}</td>
        <td style="min-width: 120px;width: 120px">银行账号</td>
        <td class="text-left" colspan="3">{if $basic.jxs_cw_banksn}{$basic.jxs_cw_banksn}{else}待补录{/if}</td>
    </tr>
</table>
<table class="table table-bordered text-center bud_hei table-striped">
    <tr class="info">
        <td rowspan="2">序号</td>
        <td rowspan="2">明细编号</td>
        <td rowspan="2">原申请人</td>
        <td rowspan="2">原申请文件</td>
        <td rowspan="2">原申请明细编号</td>
        <td rowspan="2">网点名称</td>
        <td rowspan="2">系统名称</td>
        <td rowspan="2">品牌</td>
        <td rowspan="2">三级费用科目</td>
        <td colspan="3">实际投入</td>
        <td colspan="8">本次申请核销</td>
        <td rowspan="2">支付方式</td>
        <td rowspan="2">活动开始日期</td>
        <td rowspan="2">备注</td>
    </tr>
    <tr class="info">
        <td>实际投入金额(未税)</td>
        <td>已核销金额</td>
        <td>未核销金额</td>
        <td>本次未税核销金额</td>
        <td>有无发票</td>
        <td>发票号</td>
        <td>是否增值税(可抵扣)</td>
        <td>税率</td>
        <td>税金</td>
        <td>含税核销金额</td>
        <td>实际投入金额</td>
    </tr>
    {volist name="list" id="row" key="k"}
    <tr>
        <td>{$k}</td>
        <td>
            {if $basic.status==7}
            <a href="javascript:;" class="is_showHide">{$basic.sn}_{$row.tsn}</a>
            {else}
            {$basic.sn}_{$row.tsn}
            {/if}
        </td>
        <td>{$row.ysqr_title}</td>

        <td><a {if $row.type_id==0} href="{:url('ti_apply2/view')}?id={$row.t3id}" {elseif  $row.type_id==1} href="{:url('Tijinchang/view')}?id={$row.t3id}" {else} href="{:url('TiApply/apply_de')}?aid={$row.t3id}" {/if} class="J_menuItem">{$row.t3sn}</a></td>
        <td><a {if $row.type_id==2} href="{:url('TiApply/dataview')}?did={$row.t2id}"{elseif $row.type_id==0} href="{:url('TiApply2/dataview')}?id={$row.t2id}" {else/} href="{:url('Tijinchang/dataview')}?id={$row.t2id}" {/if} class="J_menuItem">{$row.t3sn}_{$row.t2sn}</a><a href="{:url('Commonti/decisionb')}?did={$row.t2id}"  class="J_menuItem"><span style="display: none;">决策信息</span><span class="glyphicon glyphicon-zoom-in fangda" aria-hidden="true" style="display: inline-block;"></span></a></td>
        
        <td>{$row.net_title}</td>
        <td>{$row.system_title}</td>
        <td>{$row.brand_title}</td>
        <td>{$row.feetype_title}</td>
        <td class="text-right">{$row.fb_shijiweishui}</td>
        <td class="text-right">{$row.hx_yihexiao}</td>
        <td class="text-right">{$row.fb_shijiweishui-$row.hx_yihexiao}</td>
        <td class="text-right">{$row.weishuihexiaojine}</td>
        <td>{if $row.youwufapiao==0}无{else}有{/if}</td>
        <td>{$row.fapiaohao}</td>
        <td>{if $row.shizengzhishui}是{else}否{/if}</td>
        <td class="text-right">{$row.shuilv}%</td>
        <td class="text-right">{$row.shuijin}</td>
        <td class="text-right">{$row.hanshuihexiaojine}</td>
        <td class="text-right">{$row.shijitourujine}</td>
        <td>{$row.shijitourujine_title}</td>
        <td>{:date('Y-m-d',$row.huodongkaishiriqi)}</td>
        <td>{$row.beizhu}</td>
    </tr>
    <!--<tr class="is_hiddenTr">
        <td colspan="23" style="padding: 1px 1px 1px 80px">
            <table class="table table-bordered text-center" style="padding: 0;margin:0">
                <tr class="info">
                    <td style="min-width: 40px;width: 40px">编号</td>
                    <td style="min-width: 120px;width: 120px">支付日期</td>
                    
                    <td style="min-width: 120px;width: 120px">支付金额</td>
                    <td style="min-width: 120px;width: 120px">费用凭证号</td>
                    <td style="min-width: 120px;width: 120px">支付类型</td>
                    <td style="min-width: 120px;width: 120px">支付人</td>
                    <td>备注</td>
                </tr>
                <tr>
                    <td>1</td>
                    <td>2016-02-20</td>
                  
                    <td class="text-right ObjectNum">355</td>
                    <td class="text-left">111</td>
                    <td>支付</td>
                    <td></td>
                    <td>同步货补</td>
                </tr>
                <tr class="trTotal1">
                    <td colspan="2" class="text-right">小计：</td>
                    <td class="text-right ObjectNum">355</td>
                    <td colspan="4"></td>
                </tr>
            </table>
        </td>
    </tr>-->
    {/volist}
    <tr class="trTotal1 text-right">
        <td colspan="9">合计</td>
        <td class="text-right">{$shijitourujine}</td>
        <td class="text-right">{$yihexiaojine}</td>
        <td class="text-right">{$shijitourujine-$yihexiaojine}</td>
        <td class="text-right">{$weishuihexiaojine}</td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td class="text-right">{$shuijin}</td>
        <td class="text-right">{$hanshuihexiaojine}</td>
        <td class="text-right">{$shijitourujine2}</td>
        <td colspan="3"></td>
    </tr>
    <tr>
        <td colspan="2">备注</td>
        <td colspan="21">{$basic.beizhu}</td>
    </tr>
</table>
<table class="table table-bordered text-left bud_hei">
    <tr>
        <th class="text-left info">支付信息</th>
    </tr>
    <tr>
        <td>总核销金额:{$basic.tax}元   已支付金额:{$basic.yzfje}元  未支付金额:{$basic.tax-$basic.yzfje}元</td>
    </tr>
    {volist name="zhifu" id="z"}
    <tr>
        <td>支付凭证：<span>{$z.zfpz}</span> 支付日期：<span>{$z.zfsj}</span>元 支付金额：<span>{$z.bczfje}</span>元 支付人：<span>{$z.user}</span></td>
    </tr>
    {/volist}
</table>
<table class="table table-bordered text-left bud_hei">
            <tr class="info">
                <th class="text-left font-bold">审批意见</th>
            </tr>
            {volist name="logs" id="l"}
          <tr>
              <td>{$l.USERNAME} 审批动作：{$l.MEMO}；审批意见：{if $l.COMMENTS}{$l.COMMENTS}{else/}无{/if}(审批时间：{$l.ACTIONTIME})</td>
          </tr>
          
          {/volist}
      </table>
<div class="row sub_btn white-bg" style="width:100%;text-align:center;padding: 20px 0">
   <button class="btn btn-sm btn-warning" type="button" onclick="goback()">返回</button>
</div>
{if $basic.status==7}
<div class="SuccessImg font-bold">
    已&nbsp;生&nbsp;效
</div>
{/if}


<!-- 全局js -->
{include file="Public/footer"}

<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/common.js"></script><script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
  
    $(document).ready(function(){
        var $ObjectNum =$(".ObjectNum");
        toNum($ObjectNum);

        /*弹出隐藏的tr*/
       /* $(document).on("click",'.is_showHide',function(){

            var $is_hiddenTr=$(this).parent().parent().next('tr')
            if($is_hiddenTr.hasClass('is_hiddenTr')){
                $is_hiddenTr.removeClass('is_hiddenTr')
            }else{
                $is_hiddenTr.addClass('is_hiddenTr')
            }
        })*/
    })
    
    function goback(){
    	history.go(-1);
    }
</script>
</body>

</html>
